package com.healthcarex.hip.saas.message.hl7.v3.util;


import com.healthcarex.hip.saas.message.hl7.v3.core.HL7V3Constant;

public class HL7V3Util {
    /**
     *
     */
    private HL7V3Util() {
    }

    /**
     * @param multiplicity
     * @return
     */
    public static boolean isSingleNode(String multiplicity) {
        if (isNotEmpty(multiplicity)
                && multiplicity
                .indexOf(HL7V3Constant.SCHEMA_MULTIPLICITY_MULTI_CHAR) >= 0) {
            return false;
        }

        return true;
    }

    private static boolean isNotEmpty(String multiplicity) {
        if (multiplicity == null || multiplicity.trim().isEmpty()) {
            return false;
        }
        return true;
    }
}
